package com.ty.day1.home;

import java.util.Arrays;



/**
 * Created by IntelliJ IDEA.
 *
 * @author : txy
 * @create : 2023/11/22 17:55
 */
public class Task2 {
    public static void main(String[] args) {
        String name = "风清扬,王祖贤，风清扬,唐宇，唐宇，王祖贤，彭于晏，彭于晏，邱淑芳，邱淑芳" +
                ",风清扬,唐宇，唐宇，王祖贤，邱淑芳，邱淑芳";
        String s="王祖贤";
        System.out.println(name);
        if (Util.count(name,s)!=null){
            System.out.println(s+" 出现"+Util.count(name,s)+"次");
        }else {
            System.out.println("传递的参数为空");
        }
    }

}
